#ifndef __LIB_AGORA_CLIENT_CHANNEL_H__
#define __LIB_AGORA_CLIENT_CHANNEL_H__

#include <string>
#include <list>
#include "IChannel.h"

namespace AgoraClient
{

class	Channel : public IChannel
{
public:
	~Channel();
	Channel(const unsigned int id, const unsigned int idParent, const std::string &name, const unsigned int maxNameLenght, const unsigned int maxPasswordLenght, const std::string &motd, const unsigned int maxMotdLenght, const std::string &description, const unsigned int maxDescriptionLenght, const bool visible, const unsigned int maxUser, const unsigned int maxTalker, const bool hasPassword);
	const unsigned int	GetId(void) const;
	const unsigned int	GetIdParent(void) const;
	IChannel*			GetParent(void) const;
	void				SetParent(IChannel*);
	const bool			HaveParent(void) const;
	const std::string&	GetName(void) const;
	void				SetName(const std::string&);
	const unsigned int	GetMaxNameLength(void) const;
	void				SetMaxNameLength(const unsigned int, bool);
	const std::string&	GetPassword(void) const;
	void				SetPassword(const std::string&, bool);
	const unsigned int	GetMaxPasswordLength(void) const;
	void				SetMaxPasswordLength(const unsigned int, bool);
	const std::string&	GetMotd(void) const;
	void				SetMotd(const std::string&, bool);
	const unsigned int	GetMaxMotdLength(void) const;
	void				SetMaxMotdLength(const unsigned int, bool);
	const std::string&	GetDescription(void) const;
	void				SetDescription(const std::string&, bool);
	const unsigned int	GetMaxDescriptionLength(void) const;
	void				SetMaxDescriptionLength(const unsigned int, bool);
	const bool			GetVisibility(void) const;
	void				SetVisibility(const bool, bool);
	const unsigned int	GetMaxUser(void) const;
	void				SetMaxUser(const unsigned int, bool);
	const unsigned int	GetMaxTalker(void) const;
	void				SetMaxTalker(const unsigned int, bool);
	const bool			HasPassword(void) const;
	void				SetHasPassword(const bool, bool);

	void									AddChannelChild(IChannel*);
	void									RemoveChannelChild(IChannel*);
	std::list<IChannel*>*				GetChannelChild(void);
	void									AddUser(IUser*);
	void									RemoveUser(IUser*);
	std::list<IUser*>*					GetUser();

private:
	unsigned int			_id;
	unsigned int			_idParent;
	IChannel*				_parent;
	std::string				_name;
	unsigned int			_maxNameLenght;
	std::string				_password;
	unsigned int			_maxPasswordLenght;
	std::string				_motd;
	unsigned int			_maxMotdLenght;
	std::string				_description;
	unsigned int			_maxDescriptionLenght;
	bool					_visible;
	unsigned int			_maxUser;
	unsigned int			_maxTalker;
	std::list<IChannel*>	_child;
	std::list<IUser*>		_user;
	bool					_hasPassword;
};

}

#endif